#include "Weapon_Maneger.h"

Weapon_Maneger::Weapon_Maneger(void)
{
}

Weapon_Maneger::~Weapon_Maneger(void)
{
}


void Weapon_Maneger::frameMove()
{
	if( weapon.empty() ) return;

	List iter = weapon.begin();

	for( ; iter != weapon.end() ; )
	{
		if( !(*iter)->frameMove())
		{
			(*iter)->Shape_Delete();
			iter = weapon.erase(iter);
		}
		else iter++;
	}
}

void Weapon_Maneger::create(int x, int y)
{
	weapon.push_back(new Weapon( x, y ));
}

void Weapon_Maneger::render()
{ 
	List iter = weapon.begin();
	list<Weapon*>::const_iterator itor = weapon.end();
	
 	for(List iter = weapon.begin() ; iter != weapon.end() ; iter++)
 	{
 		(*iter)->render();
 	}
}